# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=knotifications
pkgver=5.73.0
pkgrel=0
pkgdesc="Abstraction for system notifications"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="qt5-qtbase-dev qt5-qtspeech-dev qt5-qtx11extras-dev kconfig-dev kcoreaddons-dev kwindowsystem-dev phonon-dev libcanberra-dev"
makedepends="$depends_dev extra-cmake-modules qt5-qttools-dev doxygen"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/knotifications-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
options="!check" # Fails due to requiring running dbus-daemon

build() {
	cmake -B "$builddir"/build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="0d893a655d1ebd791132457d4a9cb42b52c1f9ca6aa135cb2dc4e3ca3c550506898261ff0600054fff5badff910ee9f195e42d3e0fb4c98487eb3f1d6cf5d4e7  knotifications-5.73.0.tar.xz"
